<section id="main-content">
          <section class="wrapper site-min-height">
          	<h3><i class="fa fa-angle-right"></i> <?php if (isset($title)){echo $title;} ?></h3>
          	<hr>
				

					<?php 
					$dir = 'F:\xampp\htdocs\funny\media\gallery';
					
					$file = scandir($dir, 0);

    				function images_only( $file )
   					{
      					return preg_match( '/\.(gif|jpg|png)$/i', $file );
    				}

   					$file = array_filter( $file, 'images_only' );
								   					 
   					foreach($file as $pic):
   					?>
   				<div class="row mt mb">
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 desc">
						<div class="project-wrapper">
		                    <div class="project">
		                        <div class="photo-wrapper">
		                            <div class="photo">
		                            	<a class="fancybox" href="<?php echo base_url()."media/gallery/".$pic?>"><img class="img-responsive" src="<?php echo base_url()."media/gallery/".$pic?>" alt=""></a>
		                            </div>
		                            <div class="overlay"></div>
		                        </div>
		                    </div>
		                </div>
					</div><!-- col-lg-4 -->
				</div>
					<?php endforeach; ?>

				
		</section><! --/wrapper -->
</section><!-- /MAIN CONTENT -->

